package com.mydemo.io.socket;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * <p></p >
 */
public class SocketServerDemo {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(8080);
        System.out.println("服务端启动了");
        while (true){
            Socket socket = serverSocket.accept();
            new Thread(new SocketThread(socket)).start();
        }
    }
}
